# 创建django离线脚本, 创建价格策略, 免费版
import base
from web import models


def run():
    # 判断是否已经创建了免费版
    if not models.PricePolicy.objects.filter(category=1, title='个人免费版').exists():
        # 创建免费版
        models.PricePolicy.objects.create(
            category=1,
            title='个人免费版',
            price=0,
            project_num=3,
            project_member=2,
            project_space=20,
            per_file_size=5,
        )


if __name__ == '__main__':
    run()
